package servlet.wx;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.wx.MmessageDao;

/**
 * Servlet implementation class UpPass
 */
@WebServlet("/UpPassw")
public class UpPass extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private MmessageDao one=new MmessageDao();
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
		int id=Integer.parseInt(request.getParameter("id"));
		System.out.println(id);
		String pwd=request.getParameter("pass3");
		one.updatePassword(id, pwd);
		request.getRequestDispatcher("login.jsp").forward(request, response);
	}
}
